perm filename MUPRT[MAN,LCS] blob
sn#103194 filedate 1974-05-24 generic text, type T, neo UTF8
EDITING AND PRINTING MUSIC BY COMPUTER
Leland Smith
Department of Music
Stanford University
The computerized production of printed music presents two
main problems which must be treated. These have to do with the
preparation and editing of the text and the actual creation of the
master copies which will be used as the basis for conventional photo
off-set printing. This last step in the computer process, which is
most dependant upon particular hardware, will be touched on first.
The earliest music printing was done at the end of the
fifteenth century. Since then many processes have been tried.
Woodblocks, movable type, engraved plates and, lately, music
typewriters have been used. Although movable type schemes persisted
into the nineteenth century and various forms of music typewriters
are widely used today, the engraving process remains dominant because
of its flexibility in dealing with the need for a wide range of both
fixed and variable shapes in musical code.
The vast majority of musical symbols are fixed as to shape
and size, however a certain number of these items require complete
flexibility in positioning as well as the appearance of their
overlapping other items. The problem of overprinting notes on staff
lines with consistent accuracy proved a major stumbling block to
movable type schemes. The idea of breaking up the staff lines into
small segments which included the desired notes never produced fine
copy. Skillful use of a music typewriter can usually overcome the
problems connected with the items of fixed shape and size.
The question of how to deal with the variable items has
remained a major problem. In many scores composed during the past
twenty years practically everything is variable. Some of these
scores are admittedly closer to free hand drawing than musical
notation. The older methods of music printing have been unable to
cope with these works.
In what I will call conventional notation, the major variable
items are the ligatures, or ties and slurs, the lengths of note stems
and the lengths and angles of the connecting beams for the quicker
rhythmic values. Several other items may in fact be treated as
variable but usually only a few variants of each are ever used.
In the system of computerized music printing now operating at
the Artificial Intelligence Project of Stanford University the master
copy of each page is drawn by a Calcomp 563 plotter using a felt pen.
When this plotter draws diagonals minutely jagged lines result. Also
all curves must be broken down into a finite number of straight line
segments. For these reasons the master copy is made at about 15O% of
the size of the desired final format. This master is
photographically reduced when the off-set plate is made, thereby
minimizing the shortcomings of the plotter.
Most of the fixed shapes for this printing system are put
into the computer program in terms of data lists of x-y coordinates.
Because of this it is not at all difficult to change details of these
shapes to suit individual tastes. In the first few months of
operation of this program there has been a continuous process of
refining the shapes so that they more closely resemble those in
engraved music. The treble clef used in the first music printed was
made up of thirty-one straight lines. The appearance of this item
has been improved by increasing the number of lines to over one
hundred.
Many musical symbols have traditionally required a changing
line width and several require filled in black areas. (The ball-
point pen has been of limited use to music copyists!) Thus a heavy
vertical bar drawn by the plotter uses seven lines, a single cross
beam uses five lines, etc. Using the plotter in this way has both
advantages and disadvantages. By producing an oversize master, a
great variety of line widths may be created, but since the plotter
moves at a fixed rate, the time required to draw a page of music can
become considerable when there are many solid areas to be filled in.
It would seem that a combination plotter-line printer device
of high accuracy would be the ideal solution to the problem. Or
perhaps some sort of device involving the projection of microfilm
could be successfully adapted to this task. The development of
special hardware of adequate capability will surely come when its
commercial potential is realized. In any case, the Stanford music
printing program, being written in standard FORTRAN IV, can easily be
used in connection with any normal computer interface.
The music printing program, which is called MSS, includes a
switch whereby the output can be directed to either the plotter, as
is the case when the final copy is made, or to a cathode ray tube
display, where further editing may take place. This switch is quite
simple since exactly the same type of instructions are used to draw
vectors on both the plotter and the CRT.
A complete page of music is prepared in sections whose sizes
are limited by the quality of definition and the storage char-
acteristics of the CRT display terminal. There is no limit to how
many sections may be combined to make up a full page on the plotter.
The digital instructions for drawing each of the sections are stored
on separate files in the disk memory. When the operator calls up a
section to be displayed, each item is processed internally in the
order in which it was created and then the complete file is displayed
at once. If there are no time-sharing delays, this process takes
very little time. If the same file is to be drawn by the plotter, a
juggling routine rearranges the order so that items appearing in the
lower left hand corner will be drawn first, with the material in the
upper right corner appearing last. Thus the time required to move to
each succeeding item, with pen raised, will be kept to a minimum.
In the spring of 1973 a Xerox Graphics Printer (LDX) was
installed at the Artificial Intelligence Project. This device
produces very good music copy on 8 1/2" width paper at many times the
speed of the plotter. This copy is completely adequate for casual
use however it cannot compete with the quality of photo-reduced
plotter output.
The preparation and editing of each unit of music is the most
useful, and most complex, work of MSS. Basically, each item to
appear must be entered as a specific list of parameters. However
several automatic features in the program enable the operator to
ignore many of the details. The first parameter, P1, always holds a
code number for a particular item or group of items. P2 indicates the
left-right position. A scale dividing the width of the display
screen into 200 parts can be projected at any level on the CRT. The
position of most items is figured from the left leading edge.
The third parameter gives the staff number. With the present
system it is practical to display up to eight staves at one time.
(There is no fixed limit on how many staves can be included on a page
drawn by the plotter.) A staff in the middle of the screen would be
numbered zero with those above being numbered one to four and those
below minus one to minus three. Where applicable, P4 indicates
up-down spacing in terms of note numbers. The position of middle C
in the treble clef, one ledger line below the staff, has been given
the number one. This basis was chosen because of simplicity for a
musician to think in terms of upward-moving diatonic intervals. Thus
G above middle C is five, the C above is eight, etc. This musical
logic breaks down somewhat when descending below middle C. The
position for B is zero, A is minus one and so forth as the scale goes
down. Since decimal numbers may be used, great flexibility in
positioning is available. Up to eight more parameter entries can be
given for a single item.
For ordinary notes the code number in P1 is one. The
position of the note is set in P2, P3 and P4. P5 serves the double
purpose of controlling stem direction (or absence of stem) and
accidental, i.e. whether the note has a flat, sharp or natural sign.
Usually this parameter will have two digits. If the first (left)
digit is zero (or doesn't exist) there will be no stem. If the first
digit is one the stem will be up, if it is two, down. The second
digit will indicate the accidental which is to appear in front of the
note. Zero means no accidental, one is a flat, two is a sharp and
three is a natural. By adding further digits beyond a decimal point
it is possible to increase the space between the accidental and the
note to any distance desired. This extra space is often necessary in
complex chord structures where accidentals would otherwise overlap.
Notes will be filled in, or "black", unless P6 is given a
negative number, in which case they will be "white", or open notes.
P6 also aids in the automatic alignment of a note with other
previously set notes to create chords. If P6 is ten (plus or minus),
the note will shift to the correct position on the right side of an
upward note stem. The number twenty will cause the note to shift to
the left side of a downward note stem.
A single digit in P7 will show the number of tails or
rhythmic indication which will appear on the note stem. If a
sixteenth note (with two tails) is to be printed, P7 will have a two.
When P7 has two digits the note will be dotted and the second digit
will give the number of tails. Decimal values can be added to P7 to
move a dot farther out from the standard spacing, this being
necessary in some chords.
P8 is used for changing the standard length of note stems.
This is usually necessary when chords are printed and in some other
cases. The unit for extensions is the vertical distance between one
note of the scale and the next. Since notes can appear on both lines
and spaces of the staff, the number two then would extend a stem by
one complete space. The proper number of ledger lines appear
automatically for notes above and below the staff. If for any reason
the ledger lines are not desired the number one in P9 will cause them
to be suppressed.
To display F sharp above middle C as a dotted sixteenth note
on the middle of the screen the following parameters would be given.
P1 P2 P3 P4 P5 P6 P7 P8 P9
ex. 1 1 100 0 4 12 0 12 0 0
Note that P5 and P7 serve double duty. The first digit in P5
indicates that the stem goes up and the two calls a sharp. The first
digit in P7 causes the dot to appear and the two calls for two tails.
Used in this way this parameter system could become rather
cumbersome. The multiple use of some parameters was arranged in
order to save storage space in the program at a time when program
size was a factor in speed under a time-sharing system. However, as
shall be seen later, most of the more complicated aspects of this
system, as applied to setting up individual notes, seldom need be
considered by the operator. The important thing is that if any
particular detail requires changing, the right numbers for the
situation are not too hard to find.
The choice of the specific code numbers to be used in P1 to
designate the various item groups was completely arbitrary. Words
might have been used instead of numbers but there are many situations
where, after a little practice, an all number system can be easier
and faster to operate.
The item put on the screen first is usually a five-line
staff. For this the code number in P1 is ten. P2 will give the
horizontal position for the left end of the staff, P3 the vertical
position number (from minus three to three), P4 the horizontal
position for the right end of the staff and a number in P5 will cause
any desired vertical displacement. From this point on any item that
is to appear in relation to this staff will use the same value for P3
(vertical position number). If P5 has displaced the staff by any
amount, automatic adjustment will be made for all items appearing on
that staff. P6 can be used to alter the vertical size of the staff.
The dimensions of all items thereafter put on that staff will be
controlled by the number put in P6. In music engraving only a few
basic sizes are ordinarily available. With this computer system the
flexibility is complete.
Because of their variable lengths and slopes the heavy cross
beams which connect the notes of smaller rhythmic values present a
number of problems. The code number for beams is nine. P2 has the
position of the left side of the beam or beams. Since it would be
time consuming to ascertain the precise position of any note stem
this number need be only approximate. Before the beam is drawn the
exact position is found by the program and the number in P2 is
properly adjusted. As usual, P3 holds the staff number. P4 and P5
are the vertical levels of the first and last notes to be connected
by the beam. The approximate horizontal position of the last note is
put into P6. As with P2, the precise position is found
automatically. The proper slope for the beam is determined by the
program's consideration of P2, P4, P5 and P6. Of course it is
necessary to tell whether the stems are to go up or down. A first
digit of one (up) or two (down) in P7 conveys this information. The
second digit in P7 will tell how many beams are to be drawn.
Partial beams are sometimes needed. If P8 has a ten the
partial beam will be attached to the first note stem; a twenty puts
it on the last stem of the group. The end point of the partial beam
is put in P9. P10 is used to displace the beam from the outer limit
of the stems toward the note heads (necessary with partial beams).
After all the beams are in place a special feature may be used which
automatically adjusts to the proper length every note stem falling
within the span of each beam. An example of beam drawing parameters
is given.
ex. 2
P1 P2 P3 P4 P5 P6 P7 P8 P9 P10
9 51 0 3 2 83 12 0 0 0 (sets the two upper beams)
9 51 0 3 2 83 11 10 54.5 2 (sets right partial beam)
9 51 0 3 1 83 11 20 68 2 (sets left partial beam)
The upper two beams are described within one set of
parameters since they have the same characteristics. The two partial
beams must be described separately. It must again be pointed out
that the operator need be concerned with these details only when
making changes after the original input stage. In the first input
the rhythms must be given and then it is only necessary to state that
the group of notes from 1 to 7 are to be beamed; then the program
creates the three parameter lists shown above. The "homing" features
used in beam drawing are also used to facilitate the precise
placement of various markings such as accents and staccato dots.
There are some code numbers which are used to produce groups
of items which can later be edited separately if desired. The number
sixteen allows the writing of any letters or numbers into the score.
It is possible to place the beginning of a line of text at any
position and the size of the letters is flexible. Bold face printing
is simulated by duplicating each letter with a slight displacement.
The elegance of the letter shapes has not yet been considered since
it is planned to have a wide variety of type faces when different
hardware for the creation of the master pages is developed. The code
number eighteen causes key signatures of any number of sharps or
flats to be written when only the clef name and the major key are
entered. The accidentals will automatically be positioned in their
proper places for the given clef.
The most useful item-grouping in MSS is available under the
code number fourteen. With this number extended strings of notes,
along with most of their accompanying details, can be entered at
once. The program prompts the operator for the various kinds of
information required. The first prompt asks for the notes to be
typed. All notes are typed by letter names with a octave number and
a letter (F, S or N) for the accidental if needed.*1. So that the
notes will appear at the proper levels, the clef must be given at the
beginning of the line and each time a change of clef occurs. A colon
following a note indicates that the note will appear in the same
rhythmic position as the previous note so as to produce a chord. In
some close-knit chords the notes must appear on alternate sides of
the stem and accidentals must be spaced out. This section of MSS
takes care of these things automatically. The following example
shows some results of this chord-spacing procedure.
ex. 3
The second prompt asks for position one and position two.
These numbers will set the horizontal limits within which all the
given notes will fall. At this point the notes will appear on the
CRT as equally spaced quarter note values. Next, the operator will
be asked to "TYPE RHYTHM". The denominators of conventional musical
fractions are used. Thus four equals a quarter note, eight an eighth
note, etc. Dots added to these numbers will produce musical dots.
Now the music on the screen will be repositioned relative to the
given rhythmic values. All the proper rhythmic tails will appear and
the half notes and whole notes will change to "white" notes.
Next the operator will be asked, "ADD BEAMS?" If these are
needed, pairs of numbers, indicating the first and last note of each
beamed group, must be entered. If a group is to have its stems
turned downward, the second number of the pair must be negative.
Most combinations of partial and complete beams will be created
automatically according to the rhythmic values previously given for
the notes in the group. After the beams appear all unnecessary tails
will disappear and the stem lengths will be normalized. After this,
similar procedures are followed to add accents and staccato dots,
etc. to the passage and then slurs and ties. Following is the
operator's input to create the music of Example 5:
TR/K2S/4 4/D5//E/R/M/F///B4/E5/G/M/G/F/E/D/E/F/M/F/E/D/E/F/M/*
4./8/4//4./8 X 6/4/8///4/8/16//4/2*
7 9/ 16 18*
7 9 2/ 10 11 1/ 15 16 1/ 15 18 2*
In the first line TR stands for treble clef. K2S indicates a
key signature of two sharps. 4 4 is the meter. The note D is to
appear in the fifth octave of the piano keyboard. R is a rest and M
is a measure line. The second line gives the denominators of all the
rhythmic values. The third line tells which notes are to be beamed
together. The line for accents, etc. is omitted. The last line
gives the location of the ligatures. The third number of each group
indicates the curvature desired.
The horizontal spacing of printed music is usually related to
the rhythm in only a general way. Following the directions outlined
above, the sections with quicker values will be closely bunched
together while the slow values will occupy rather large areas. By
using the editing techniques available in MSS a special line of
rhythms may be set up at the top of the screen which will control the
spacing of everything put below. What this does in effect is to
change internally the values of the horizontal spacing numbers. For
example, if a whole note is made to occupy the same space on this
highest line as a following quarter note, then the program will
consider the space under the whole note as being four times as great
as that under the quarter when the automatic "equal" spacing takes
place. In this way the practical, readable spacing of the music is
easily managed.
Example 4a shows an extreme case of what can happen if strict
rhythmic spacing is adhered to.
ex. 4a
Example 4b shows how the use of the spacing line can produce
a readable form of the same input.
ex. 4b
The spatial problems of entering the text in vocal music are
greatly facilitated by a feature which displays order numbers over
the notes of a given line. The various syllables and dashes are
typed in with slashes separating each group of characters requiring a
unique position. Then a parallel series of numbers are entered which
will designate the precise position for each of the groups.
ex. 5
Input to MSS for text: KY/-/RI/-/E,/KY/-/RI/-/E/ etc.
1/1.6/2/2.6/3/4/4.7/5/ etc.
Most of the conventional musical symbols are available in
MSS. Any special shapes may be created by use of a subsidiary
program which allows you to draw on the display screen either by
typed commands or by use of a light pen. Expanded outline drawings
are made and then any areas may be designated for filling in. One of
the more complicated parts of MSS is the routine whereby the dark
areas are given exactly the right number of lines to properly fill
them regardless of the overall size factors. Once a shape is
completed it may be freely edited. Points may be moved, inserted or
deleted. When the shape is used in a score it may be inverted or
reversed or expanded or contracted by varying the proper parameters.
Scores including a combination of ordinary and non-conventional
graphic notation will be easily produced.
ex. 6
Perhaps the most important elements of MSS are its various
editing features. Once any group of items is set up it is essential
that corrections of all sorts can be made with a minimum of effort.
The program has given each symbol entered an item number and it is
quite easy to seek out a particular item for editing. The items may
be searched for by number, by category (i.e. notes, beams, letters,
etc.) or by position. A box appears around each item as it is
brought up for editing. Once the correct item is found, all its
current parameters are listed on the bottom of the screen. New
values may be given for any or all of the parameters. The old form
of the symbol remains on the screen while the newly edited form is
created. When the edit mode is left it is possible to delete or save
the old form of the symbol. In this way it is possible to copy any
single item from one place to another by typing only the new
position parameters. There are also ways to copy whole groups of
items from one position to another. MSS allows for the expansion or
contraction of the horizontal spacing on any staff, or on all staves
at once. This is usually used as a last step to arrange the various
parts of completed lines into a visually pleasing and readable whole.
By typing J, an entire brace of music, including several staves, can
be properly justified at once. Space will be "stolen" from the
slower rhythmic values and from notes without accidentals in order to
provide the minimum space requirements for each type of item.
ex. 7
All work done with MSS can be stored on various memory
devices for further use. When a particular unit of work is called
back into the program it may be combined with other units or edited
some more or sent to the plotter for the production of hard copy.
When a section is plotted, the overall dimensions may be adjusted to
any size desired.
With older music printing methods, the parts for individual
players of an ensemble piece had to be created separately. With MSS,
the extraction of parts from a full score can be done automatically
using a small subsidiary program. Some spacings may have to be
changed and full measures of rests combined, but little other editing
should be necessary.
While MSS has been conceived for use on a time-sharing,
display oriented computer system, a practical variant of the program
could be developed for the archaic punched card systems. In this
case a considerable amount of advance planning of layout would be
advisable so that not too many plotter runs for proofs would be
needed.
It is reasonable to predict that some computerized system
such as the one described will eventually be utilized for most music
publication. The time required to set up a page with this system is
already competitive with good hand copy work. This time is much less
than that needed for engraving or music typewriting. None of these
older methods can match the ease of editing and entering corrections
of all sorts that a computer program can offer. As computer time and
equipment become less and less expensive it seems likely that this
method for printing music will prove to be economically attractive
and, as a result, present day composers will gain much more ready
access to quality publication.
Notes
1. The conventions for musical input in MSS are very similar to
those used in an extensive program written by this author for
translating musical terminology to input for a computer sound
generation system. A description of this is found in, Leland Smith,
"SCORE- A Musician's Approach to Computer Music," Journal of the
Audio Engineering Society, Jan./Feb. 1972, vol. 20, number 1.
Especially useful in SCORE are the several ways of efficiently
dealing with the various kinds of repetition found in most music.